﻿<UserControl
    x:Class="yavc.Metro.Controls.HeaderControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:yavc.Metro.Controls"
    x:Name="hdrCtrl">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Background="{StaticResource MetroAccentBrush}">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="10">
                <StackPanel.Resources>
                    <Style TargetType="TextBlock" BasedOn="{StaticResource MetroTextBase}">
                        <Setter Property="FontWeight" Value="Bold" />
                    </Style>
                </StackPanel.Resources>
                <TextBlock Text=" " FontSize="{Binding ElementName=hdrCtrl, Path=HeaderFontSize}" />
                <TextBlock Text="{Binding ElementName=hdrCtrl, Path=HeaderText}" FontSize="{Binding ElementName=hdrCtrl, Path=HeaderFontSize}" />
                <TextBlock Text=" " FontSize="{Binding ElementName=hdrCtrl, Path=HeaderFontSize}" />
            </StackPanel>
        </Border>
        <TextBlock x:Name="subHeader" Visibility="Collapsed" HorizontalAlignment="Center" Grid.Row="1" Margin="0,5"
                   FontWeight="Bold"
                   Text="{Binding ElementName=hdrCtrl, Path=SubHeaderText}" FontSize="{Binding ElementName=hdrCtrl, Path=SubHeaderFontSize}"  />
    </Grid>
</UserControl>
